<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html><head>
        <link rel="stylesheet" type="text/css" href="apidocs.css"/>
        <title>API docs for &ldquo;sympy.plotting.plot.Plot&rdquo;</title>
        </head>
        <body><h1 class="class">Class s.p.p.Plot(object):</h1><span id="part">Part of <a href="sympy.plotting.plot.html">sympy.plotting.plot</a></span><div class="toplevel"><pre>Plot Examples
=============

See examples/plotting.py for many more examples.


>>> from sympy import symbols, Plot
>>> x,y,z = symbols('xyz')

>>> Plot(x*y**3-y*x**3)

>>> p = Plot()
>>> p[1] = x*y
>>> p[1].color = z, (0.4,0.4,0.9), (0.9,0.4,0.4)

>>> p = Plot()
>>> p[1] =  x**2+y**2
>>> p[2] = -x**2-y**2


Variable Intervals
==================

The basic format is [var, min, max, steps], but the
syntax is flexible and arguments left out are taken
from the defaults for the current coordinate mode:

>>> Plot(x**2) # implies [x,-5,5,100]
>>> Plot(x**2, [], []) # [x,-1,1,40], [y,-1,1,40]
>>> Plot(x**2-y**2, [100], [100]) # [x,-1,1,100], [y,-1,1,100]
>>> Plot(x**2, [x,-13,13,100])
>>> Plot(x**2, [-13,13]) # [x,-13,13,100]
>>> Plot(x**2, [x,-13,13]) # [x,-13,13,100]
>>> Plot(1*x, [], [x], mode='cylindrical')
... # [unbound_theta,0,2*Pi,40], [x,-1,1,20]


Coordinate Modes
================

Plot supports several curvilinear coordinate modes, and
they independent for each plotted function. You can specify
a coordinate mode explicitly with the 'mode' named argument,
but it can be automatically determined for cartesian or
parametric plots, and therefore must only be specified for
polar, cylindrical, and spherical modes.

Specifically, Plot(function arguments) and Plot[n] =
(function arguments) will interpret your arguments as a
cartesian plot if you provide one function and a parametric
plot if you provide two or three functions. Similarly, the
arguments will be interpreted as a curve is one variable is
used, and a surface if two are used.

Supported mode names by number of variables:

1: parametric, cartesian, polar
2: parametric, cartesian, cylindrical = polar, spherical

>>> Plot(1, mode='spherical')


Calculator-like Interface
=========================

>>> p = Plot(visible=False)
>>> f = x**2
>>> p[1] = f
>>> p[2] = f.diff(x)
>>> p[3] = f.diff(x).diff(x)
>>> p
[1]: x**2, 'mode=cartesian'
[2]: 2*x, 'mode=cartesian'
[3]: 2, 'mode=cartesian'
>>> p.show()
>>> p.clear()
>>> p
<blank plot>
>>> p[1] =  x**2+y**2
>>> p[1].style = 'solid'
>>> p[2] = -x**2-y**2
>>> p[2].style = 'wireframe'
>>> p[1].color = z, (0.4,0.4,0.9), (0.9,0.4,0.4)
>>> p[1].style = 'both'
>>> p[2].style = 'both'
>>> p.close()


Plot Window Keyboard Controls
=============================

Screen Rotation:
    X,Y axis      Arrow Keys, A,S,D,W, Numpad 4,6,8,2
    Z axis        Q,E, Numpad 7,9

Model Rotation:
    Z axis        Z,C, Numpad 1,3

Zoom:             R,F, PgUp,PgDn, Numpad +,-

Reset Camera:     X, Numpad 5

Camera Presets:
    XY            F1
    XZ            F2
    YZ            F3
    Perspective   F4

Sensitivity Modifier: SHIFT

Axes Toggle:
    Visible       F5
    Colors        F6

Close Window:     ESCAPE

=============================</pre></div><table class="children"><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__init__">__init__</a></td><td><div><p>Positional Arguments</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.show">show</a></td><td><div><p>Creates and displays a plot window, or activates it</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.close">close</a></td><td><div><p>Closes the plot window.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.saveimage">saveimage</a></td><td><div><p>Saves a screen capture of the plot window to an</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.clear">clear</a></td><td><div><p>Clears the function list of this plot.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__getitem__">__getitem__</a></td><td><div><p>Returns the function at position i in the</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__setitem__">__setitem__</a></td><td><div><p>Parses and adds a PlotMode to the function</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__delitem__">__delitem__</a></td><td><div><p>Removes the function in the function list at</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.firstavailableindex">firstavailableindex</a></td><td><div><p>Returns the first unused index in the function list.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.append">append</a></td><td><div><p>Parses and adds a PlotMode to the function</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__len__">__len__</a></td><td><div><p>Returns the number of functions in the function list.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__iter__">__iter__</a></td><td><div><p>Allows iteration of the function list.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__repr__">__repr__</a></td><td><span class="undocumented">Undocumented</span></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.__str__">__str__</a></td><td><div><p>Returns a string containing a new-line separated</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.adjust_all_bounds">adjust_all_bounds</a></td><td><span class="undocumented">Undocumented</span></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.plotting.plot.Plot.wait_for_calculations">wait_for_calculations</a></td><td><span class="undocumented">Undocumented</span></td></tr></table>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__init__">__init__(self, *fargs, **win_args):</a></div>
            <div class="functionBody"><pre>Positional Arguments
====================

Any given positional arguments are used to
initialize a plot function at index 1. In
other words...

>>> from sympy.core import Symbol
>>> x = Symbol('x')
>>> p = Plot(x**2, visible=False)

...is equivalent to...

>>> p = Plot(visible=False)
>>> p[1] = x**2

Note that in earlier versions of the plotting
module, you were able to specify multiple
functions in the initializer. This functionality
has been dropped in favor of better automatic
plot plot_mode detection.


Named Arguments
===============

axes
    An option string of the form
    "key1=value1; key2 = value2" which
    can use the following options:

    style = ordinate
        none OR frame OR box OR ordinate

    stride = 0.25
        val OR (val_x, val_y, val_z)

    overlay = True (draw on top of plot)
        True OR False

    colored = False (False uses Black,
                     True uses colors
                     R,G,B = X,Y,Z)
        True OR False

    label_axes = False (display axis names
                        at endpoints)
        True OR False

visible = True (show immediately
    True OR False


The following named arguments are passed as
arguments to window initialization:

antialiasing = True
    True OR False

ortho = False
    True OR False

invert_mouse_zoom = False
    True OR False</pre></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.show">show(self):</a></div>
            <div class="functionBody"><div><p>Creates and displays a plot window, or activates it (gives it focus) if 
it has already been created.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.close">close(self):</a></div>
            <div class="functionBody"><div><p>Closes the plot window.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.saveimage">saveimage(self, outfile=None, format='', size=(600, 500)):</a></div>
            <div class="functionBody"><div><p>Saves a screen capture of the plot window to an image file.</p>
<p>If outfile is given, it can either be a path or a file object. Otherwise
a png image will be saved to the current working directory. If the format 
is omitted, it is determined from the filename extension.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.clear">clear(self):</a></div>
            <div class="functionBody"><div><p>Clears the function list of this plot.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__getitem__">__getitem__(self, i):</a></div>
            <div class="functionBody"><div><p>Returns the function at position i in the function list.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__setitem__">__setitem__(self, i, args):</a></div>
            <div class="functionBody"><div><p>Parses and adds a PlotMode to the function list.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__delitem__">__delitem__(self, i):</a></div>
            <div class="functionBody"><div><p>Removes the function in the function list at position i.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.firstavailableindex">firstavailableindex(self):</a></div>
            <div class="functionBody"><div><p>Returns the first unused index in the function list.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.append">append(self, *args):</a></div>
            <div class="functionBody"><div><p>Parses and adds a PlotMode to the function list at the first available 
index.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__len__">__len__(self):</a></div>
            <div class="functionBody"><div><p>Returns the number of functions in the function list.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__iter__">__iter__(self):</a></div>
            <div class="functionBody"><div><p>Allows iteration of the function list.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__repr__">__repr__(self):</a></div>
            <div class="functionBody"><div class="undocumented">Undocumented</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.__str__">__str__(self):</a></div>
            <div class="functionBody"><div><p>Returns a string containing a new-line separated list of the functions 
in the function list.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.adjust_all_bounds">adjust_all_bounds(self):</a></div>
            <div class="functionBody"><div class="undocumented">Undocumented</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.plotting.plot.Plot.wait_for_calculations">wait_for_calculations(self):</a></div>
            <div class="functionBody"><div class="undocumented">Undocumented</div></div>
            </div></body>
        